from fastapi import Request, APIRouter
from fastapi.responses import HTMLResponse, FileResponse
from typing import Dict, Any

# 创建路由实例
router = APIRouter(prefix="/admin", tags=["管理员视图"])


@router.get("/", response_class=HTMLResponse)
async def dashboard_view(request: Request):
    """
    管理员仪表盘页面
    """
    return FileResponse("templates/admin/dashboard.html")


@router.get("/users", response_class=HTMLResponse)
async def users_view(request: Request):
    """
    用户管理页面
    """
    return FileResponse("templates/admin/users.html")


@router.get("/suppliers", response_class=HTMLResponse)
async def suppliers_view(request: Request):
    """
    AI供应商管理页面
    """
    return FileResponse("templates/admin/suppliers.html")


@router.get("/roles", response_class=HTMLResponse)
async def roles_view(request: Request):
    """
    AI角色管理页面
    """
    return FileResponse("templates/admin/roles.html")


@router.get("/consultations", response_class=HTMLResponse)
async def consultations_view(request: Request):
    """
    问诊记录管理页面
    """
    return FileResponse("templates/admin/consultations.html")